:root {
    --primary-color: #2ecc71;
    /* 主色调 */
    --dark-bg: #2c3e58;
    /* 暗色背景 */
    --text-light: #ecf0f1;
    /* 浅色文字 */
}

/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 响应式导航栏 */
.sticky-nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--dark-bg);
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
}

.nav-links a {
    color: var(--text-light);
    margin-left: 2rem;
    text-decoration: none;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary-color);
}

/* 项目画廊布局 */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmux(300px, 1fr));
    gap: 2rem;
    padding: 2rem 5%;
}

.project-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.6s;
}

.project-card.active {
    transform: translateY(0);
    opacity: 1;
}

/* 悬停动画 */
.project-card:hover .project-info {
    transform: translateY(0);
}

.project-info {
    padding: 1.5rem;
    transform: translateY(100%);
    transition: transform 0.3s;
    background: rgba(0, 0, 0, 0.8);
    color: white;
}

/* 核心功能扩展 */
/* Lightbox图片查看 */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.lightbox-content {
    position: relative;
    max-width: 98%;
    max-height: 90%;
}

.lightbox img {
    max-height: 80vh;
    border-radius: 5px;
}

.close {
    position: absolute;
    top: -30px;
    right: -30px;
    color: white;
    font-size: 2rem;
    cursor: pointer;
}

/* 响应式优化 */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 60px;
        right: -100%;
        background: var(--dark-bg);
        flex-direction: column;
        width: 200px;
        padding: 1rem;
        transition: right 0.3s;
    }

    .nav-links.show {
        right: 0;
    }

    .nav-links a {
        margin: 1rem 0;
    }
}

/* 联系我们部分样式 */
#contact {
    padding: 2rem 5%;
    background: #f9f9f9;
    margin-top: 2rem;
}

#contact .section-title {
    font-size: 2rem;
    color: var(--primary-color);
    margin: 1.5rem;
}

#contactForm {
    display: flex;
    flex-direction: column;
    max-width: 600px;
    margin: 0 auto;
}

#contactForm input,
#contactForm textarea {
    padding: 1rem;
    margin-bottom: 1.5rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

#contactForm input:focus,
#contactForm textarea:focus {
    border-color: var(--primary-color);
}

#contactForm button {
    padding: 1rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

#contactForm button:hover {
    background: #27ae60;
}


/* 暗色模式样式 */
body.dark-mode {
    background: var(--dark-bg);
    color: #ecf0f1;
}

.dark-mode .sticky-nav {
    background: #1a252f;
}

.dark-mode .project-card {
    background: #34495e;
    color: #ecf0f1;
}

.dark-mode .project-info {
    background: rgba(0, 0, 0, 0.6s);
}

/* 暗色模式下联系我们部分样式 */
body.dark-mode #contact {
    background-color: #34495e;
}

body.dark-mode #contact .section-title {
    color: white;
}

body.dark-mode #contactForm input,
body.dark-mode #contactForm textarea {
    background: #2c3e50;
    color: white;
    border-color: #555;
}

body.dark-mode #contactForm input:focus,
body.dark-mode #contactForm textarea:focus {
    border-color: var(--primary-color);
}

body.dark-mode #contactForm button {
    background-color: var(--primary-color);
}

body.dark-mode #contactForm button:hover {
    background: #27ae60;
}

/* 懒加载过渡效果 */
.lazyload {
    opacity: 0;
    transition: opacity 0.3s;
  }
  
  .lazyloaded {
    opacity: 1;
  }